//
//  BCDebugItemModel.h
//  Pod
//
//  Created by Basic on 2017/3/14.
//  Copyright © 2017年 naruto. All rights reserved.
//  debug 组件
//  debug的item

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@class BCDebugItemModel;
/// 调试菜单 选中事件
typedef void(^BCDebugItemSelectBlock)(BCDebugItemModel *item, NSInteger selectRow);
/// 调试菜单 类型
typedef enum : NSUInteger {
    /// 普通显示类型
    BCDebugItemType_Normal = 0,
    /// 选择类型
    BCDebugItemType_Selector = 1,
    BCDebugItemType_other
} BCDebugItemType;


@class BCDebugItemOption;
/// 调试菜单里的选项 选中事件
typedef void(^BCDebugItemOptionSelectBlock)(BCDebugItemModel *item, BCDebugItemOption *option, NSInteger selectRow);


#pragma mark - debug 选项 group
@interface BCDebugItemGroup : NSObject
/// group 的配置class
@property (nonatomic, strong, nullable) Class bcConfigClass;
/// group名称
@property (nonatomic, strong, nullable) NSString  *bcName;
/// 子选项item列表
@property (nonatomic, strong, nullable) NSMutableArray<BCDebugItemModel *>    *bcItems;

@end


#pragma mark - debug 菜单
@interface BCDebugItemModel : NSObject
/// 标识符
@property (nonatomic, assign) NSInteger bcTag;
/// 名称
@property (nonatomic, strong, nullable) NSString    *bcName;
/// 描述
@property (nonatomic, strong, nullable) NSString    *bcDetail;
/// 类型
@property (nonatomic, assign) BCDebugItemType   bcType;
/// 是否可以再点进去 UITableViewCellAccessoryType
@property (nonatomic, assign) NSInteger bcAccessoryType;
/// 选中效果，UITableViewCellSelectionStyle
@property (nonatomic, assign) NSInteger bcSelectStyle;
/// 选中item的action
@property (nonatomic, copy, nullable) BCDebugItemSelectBlock    selectItemAction;
/// 选中 option 的action
@property (nonatomic, copy, nullable) BCDebugItemOptionSelectBlock  selectOptionAction;
/// item的选择项（如果item 类型是switch）
@property (nonatomic, strong, nullable) NSMutableArray<BCDebugItemOption *> *bcOptions;
/// 上次选择的option index
@property (nonatomic, assign) BCDebugItemType   bcSelectOptionIndex;
@end


#pragma mark - debug 菜单的选项列表
@interface BCDebugItemOption : NSObject
/// 标识符
@property (nonatomic, assign) NSInteger bcTag;
/// 名称
@property (nonatomic, strong, nullable) NSString    *bcName;
/// 描述
@property (nonatomic, strong, nullable) NSString    *bcDetail;
@end

NS_ASSUME_NONNULL_END
